import store from './store'
export default function (start) {
    window.addEventListener('message', function (event) {
        const data = event.data
        const type = data.state
        const path = data.path
        switch (type) {
            case 'connect':
                break
            case 'speechAudio': // 视频切语音

                break
            case 'silenceCall': // 静音
                store.state.roomClient.muteMic()
                break
            case 'unSilenceCall': // 取消静音
                store.state.roomClient.unmuteMic()
                break
        }
    })

    window.onload = function () {
        start()
    }
}
